package com.mjf.io.properties;

import java.util.Properties;

public class PropertiesUse {
    public static void main(String[] args) {

        Properties prop = new Properties();

        // 添加
        prop.setProperty("name", "shy");
        prop.setProperty("age", "12");
        prop.setProperty("sex", "man");

        // 查询
        String age = prop.getProperty("age");
        System.out.println(age);

        // 修改
        prop.setProperty("age", "20");
        System.out.println(prop);

        // 删除
        prop.remove("age");
        System.out.println(prop);

    }
}
